package com.tianbing.adlottery.helper;

import java.util.List;

import com.fengniu.ejb.dao.IUserDao;
import com.tianbing.adlottery.util.UserSession;

public class AuthorizationFactory {
	IUserDao userDao;

	List managers;

	protected static UserSession createAuthorization(String username, String password) {
		return null;
	};

	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}

	public void setManagers(List managers) {
		this.managers = managers;
	};

	private boolean isPredefinedManager(String emailAddr) {
		if (managers != null && managers.size() > 0) {
			for (int i = 0; i < managers.size(); i++) {
				String emailAddr1 = (String) managers.get(i);
				if (emailAddr.equals(emailAddr1)) {
					return true;
				}
			}
		}
		return false;
	}
}